/*
 * Copyright (c) 2018-2999 广州市蓝海创新科技有限公司 All rights reserved.
 *
 * https://www.mall4j.com/
 *
 * 未经允许，不可做商业用途！
 *
 * 版权所有，侵权必究！
 */
package com.yami.shop.discount.common.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @author yami
 */
@Data
@TableName("tz_discount")
public class Discount implements Serializable {
    private static final long serialVersionUID = -82534421471027766L;

    @TableId
    @ApiModelProperty("满减满折优惠id")
    private Long discountId;

    @ApiModelProperty("活动名称")
    private String discountName;

    @ApiModelProperty("枚举DiscountRule(0 满钱减钱 1满件减钱 2 满钱打折 3满件打折)")
    private Integer discountRule;

    @ApiModelProperty("减免类型 0按满足最高层级减一次 1每满一次减一次")
    private Integer discountType;

    @ApiModelProperty("适用商品类型 0全部商品参与 1指定商品参与 2指定商品不参与")
    private Integer suitableProdType;

    @ApiModelProperty("最多减多少")
    private Double maxReduceAmount;

    @ApiModelProperty("开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    @ApiModelProperty("结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    @ApiModelProperty("活动状态：1 开启 0 关闭")
    private Integer status;

    @ApiModelProperty("手机端活动图片")
    private String mobilePic;

    @ApiModelProperty("pc端活动列表图片")
    private String pcPic;

    @ApiModelProperty("pc端活动背景图片")
    private String pcBackgroundPic;

    @ApiModelProperty("店铺ID")
    private Long shopId;

    @ApiModelProperty("店铺名称")
    @TableField(exist = false)
    private String shopName;

    @ApiModelProperty("满减满折优惠项")
    @TableField(exist = false)
    private List<DiscountItem> discountItems;

    @ApiModelProperty("满减满折商品")
    @TableField(exist = false)
    private List<DiscountProd> discountProds;
}
